package com.it.jnxy.Config;

import com.it.jnxy.Controller.LoginController;
import com.it.jnxy.Interceptor.LoginChekInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private LoginController loginController;
    @Autowired
    private LoginChekInterceptor loginChekInterceptor;
    //不拦截请求路径中带有/login的请求
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        //addPathPatterns("添加需要拦截的路径/**")
//        registry.addInterceptor(loginChekInterceptor).addPathPatterns("/**").excludePathPatterns("/login","/register");
//    }
}
